﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Dominio;
using Interfaces;

namespace Obligatorio1
{
    public partial class DetalleExpendido : Form
    {
        Expendido ExpendidoActual;
        Surtidor SurtidorActual;

        public DetalleExpendido(Expendido idExp, Surtidor idSurt)
        {
            InitializeComponent();
            ExpendidoActual = idExp;
            SurtidorActual = idSurt;
        }

        private void label6_Click(object sender, EventArgs e)
        {

        }

        private void DetalleExpendido_Load(object sender, EventArgs e)
        {
            IReporte ir = new ImpIReporte();
            List<String> datos = ir.DetalleCarga(ExpendidoActual, SurtidorActual);
            int indice = 1;
            foreach (String d in datos) {
                if (indice == 1)
                    labelFecha.Text = d;
                else if (indice == 2)
                    labelCliente.Text = d;
                else if (indice == 3)
                    labelLitros.Text = d;
                else if (indice == 4)
                    labelManguera.Text = d;
                else
                    labelCombustible.Text = d;
                indice++;
            }
        }
    }
}
